package com.fansl.koala.quickdev.module.users.bean.dto;

import com.fansl.koala.quickdev.common.enums.GenderEnum;
import com.fansl.koala.quickdev.common.validator.Update;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author fansl
 * @Description: 用于 系统角色表 业务领域相关数据传输对象
 * @date 2020/3/21 20:35
 */
@Data
public class SysUserDTO implements Serializable {

    @NotNull(message = "id不能为空", groups = Update.class)
    private Long id;

    @NotNull(message = "用户昵称不能为空")
    @Max(value = 50, message = "用户昵称不能超过50个字")
    private String nickname;

    @NotNull(message = "性别不能为空")
    private GenderEnum gender;

    @NotEmpty(message = "角色不能为空")
    private List<Integer> roleIds;

    private Long deptId;
}
